package com.jk.admin.controller;

import com.jk.admin.entity.TypeEntity;
import com.jk.admin.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class TypeController {
    @Autowired
    private TypeService typeService;


    @RequestMapping("getType")
    public List<TypeEntity> getListType(){
        return typeService.getListType();
    }

    @RequestMapping("Type")
    public void addType(TypeEntity typeEntity){
        typeService.addType(typeEntity);
    }
    @RequestMapping("delType")
    public void delType(Integer id){
        typeService.delType(id);
    }

}
